import type { AuthorityInOrUpReq, DeleteAuthorityReq } from './authorityType'
import request from '@/utils/http/request'

// 菜单权限树查询
export function getAuthorityTree() {
  return request.post<any>({
    url: '/pm-system/api/v1/authority/queryAllAuthority',
    method: 'post',
  })
}

// 添加/修改菜单权限
export function saveAuthority(data: AuthorityInOrUpReq) {
  return request.post<any>({
    url: '/pm-system/api/v1/authority/save',
    method: 'post',
    data,
  })
}

// 删除菜单权限
export function deleteAuthority(data: DeleteAuthorityReq) {
  return request.post<any>({
    url: '/pm-system/api/v1/authority/delete',
    method: 'post',
    data,
  })
}
